<?php
class mdl_config extends CI_Model{ 
	
	var $tabel = 'macs_config';
	
	function __construct(){
		parent::__construct();
	} 

	function data($p=array()){
		$sql = "
		 	select 
				SQL_CALC_FOUND_ROWS *
			FROM ".$this->tabel." 
			ORDER BY id ASC 
		";	 
		
		$query = $this->db->query($sql);
		$found_rows = $this->db->query('SELECT FOUND_ROWS() as found_rows');
		return array(
			"data" 	=> $query->result(),
			"count"	=> $found_rows->row()
		);
	}	
	
}